package com.itheima;

import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    //测试类
    public static void main(String[] args) {
        //根据spring配置文件创建对象
        ApplicationContext ac = new ClassPathXmlApplicationContext("spring.xml");
        //获取bean对象
        UserService userService = ac.getBean(UserService.class);
        userService.save();

    }
}
